//
//  ZPBAllModel.m
//  WZLProduct
//
//  Created by boys on 16/3/26.
//  Copyright © 2016年 HaiTeng. All rights reserved.
//

#import "ZPBAllModel.h"
#import "ZPBChildModel.h"
@implementation ZPBAllModel

- (void)setValue:(id)value forKey:(NSString *)key {
    
    [super setValue:value forKey:key];
    
    self.childrenArr = [NSMutableArray array];
    if ([key isEqualToString:@"children"]) {
        for (NSDictionary *tempDic in value) {
            ZPBChildModel *model = [[ZPBChildModel alloc] init];
            [model setValuesForKeysWithDictionary:tempDic];
            [_childrenArr addObject:model];
        }
    }
    
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    
    
    
}

@end
